import Vue from "vue";
import App from "./App.vue";
import router from "./router";
import store from "./store";
import "vant/lib/index.css";
import {
  Toast,
  Search,
  Icon,
  DatetimePicker,
  Overlay,
  Swipe,
  SwipeItem,
  ImagePreview,
} from "vant";

import "./assets/css/h5-common.css";
import { $com_util } from "./utils/util.js";
import $imServive from "@/utils/im-servive";
import $appServive from "@/utils/app-servive";

Vue.use(Toast);
Vue.use(Search);
Vue.use(Icon);
Vue.use(DatetimePicker);
Vue.use(Overlay);
Vue.use(Swipe);
Vue.use(SwipeItem);
Vue.use(ImagePreview);

Vue.config.productionTip = false;

Vue.prototype.$imServive = $imServive;
Vue.prototype.$appServive = $appServive;

Vue.prototype._H5_apiDomain = process.env.VUE_APP_H5_apiDomain;

Vue.prototype._IM_DOMAIN = process.env.VUE_APP_IM_DOMAIN;

Vue.prototype.$com_util = $com_util;

Vue.prototype.$wx = {
  toast: Toast,
  previewImage: ImagePreview,
};

new Vue({
  router,
  store,
  render: (h) => h(App),
}).$mount("#app");
